<!DOCTYPE html>
<html>
<head>
    <meta name="layout" content="main2"/>
    <g:set var="entityName" value="${message(code: 'campaignStatus.label', default: 'campaignStatus')}"/>
    <title>市场活动状态</title>
</head>

<body>
<div class="main-body">
    <div class="page-wrapper">
        <!-- Page-header start -->
        <div class="page-header">
            <div class="page-header-title">
                <h4>市场活动状态</h4>
            </div>

            <div class="page-header-breadcrumb">
                <ul class="breadcrumb-title">
                    <li class="breadcrumb-item">
                        <a href="/salesDashboard/index">
                            <i class="icofont icofont-home"></i>
                        </a>
                    </li>
                    <li class="breadcrumb-item"><a href="#!">市场活动状态</a>
                    </li>
                </ul>
            </div>
        </div>
        <!-- Page-header end -->
        <!-- Page-body start -->
        <div class="page-body">
            <!-- Hover table card start -->
            <div class="card">
                <div class="card-header">
                    <h5>市场活动状态</h5>

                    <div class="card-header-right">
                        <g:link action="create"  data-toggle="tooltip" data-placement="top"
                                title="新增" data-original-title="新增">
                            <i class="icofont icofont-plus"></i>
                        </g:link>
                        <i class="icofont icofont-rounded-down"></i>
                    </div>
                </div>

                <div class="card-block dt-responsive">

                    <div class="table-responsive">
                        <div id="dom-jqry_wrapper" class="dataTables_wrapper dt-bootstrap4">

                            <table class="table table-striped  table-bordered table-hover">
                                <thead>
                                <tr>
                                    <g:sortableColumn property="name" title="名称"/>
                                    <g:sortableColumn property="active" title="是否启用"/>
                                    <th width="15%" class="text-center">操作</th>
                                </tr>
                                </thead>
                                <tbody>
                                <g:each in="${campaignStatusList}">
                                    <tr>
                                        <td><g:link action="show" id="${it.id}"
                                                    class="firstTd">${it?.name}</g:link></td>
                                        <td>${it?.active}</td>
                                        <td class="text-center">
                                            <g:link class="m-r-15 text-primary"
                                                    controller="campaignStatus" action="edit"
                                                    id="${it?.id}">
                                                <i class="icofont icofont-ui-edit"></i>
                                            </g:link>

                                            <g:form controller="campaignStatus" action="delete" class="inline" id="${it.id}" method="DELETE">
                                                <button class="deleteBtn text-danger" type="button">
                                                    <i class="icofont icofont-trash"></i>
                                                </button>
                                            </g:form>

                                        </td>
                                    </tr>
                                </g:each>
                                </tbody>
                            </table>

                            <div class="dataTables_paginate">
                                <div class="pagination">
                                    <g:paginate total="${campaignStatusCount ?: 0}" params="${params}"/>
                                </div>
                            </div>
                        </div>

                    </div>

                </div>
            </div>
            <!-- Hover table card end -->
        </div>

        <!-- Page-body end -->
    </div>
</div>
<g:javascript>
    $(function () {
        $("#resetBtn").click(function () {
            $("#name").val("");

        })
    });

</g:javascript>
</body>
</html>
